import PageTable from '@/components/PageTable/index.vue'
// 获取 dom
const pageTableRef = ref<InstanceType<typeof PageTable>>()
export function usePageSearch() {
  // 搜索重置
  const handleResetClisk = () => {
    console.log('重置了')
    pageTableRef.value?.getTableData()
  }
  // 点击搜索按钮
  const handleQueryClisk = (queryInfo: any = {}) => {
    console.log('搜索了', queryInfo)
    pageTableRef.value?.getTableData(queryInfo)
  }
  // return [handleResetClisk, handleQueryClisk]
  return [handleResetClisk, handleQueryClisk, pageTableRef]
}
